package ExtendsStudy.demo_09;

public class Test {
    public static void main(String[] args) {
        getInter(() -> System.out.println("匿名内部类"));
        useDemo(new Demo());
    }

    public static void getInter(Inter inter){
        inter.swim();
    }
    public static void useDemo(Demo demo){
        demo.show();
    }
}
class Demo{
    public void show(){
        System.out.println("show()");
    }
}
interface Inter{
    void swim();
}
